/**
 * @description 解决Nuxt刷新引入 antd 样式延迟生效
 * @root hooks/antd.ts
 * 
 */

import { extractStyle } from 'ant-design-vue/lib/_util/static-style-extract';
import fsExtra from 'fs-extra';

async function myExtractStyle() {
    const cssText = extractStyle();
    await fsExtra.outputFile('public/css/antd.css', cssText, 'utf8')
}

export default myExtractStyle;
